from pylab import *

def readFile(fname):
    ifile = open(fname, "r")
    lines = ifile.readlines()
    ifile.close()
    
    xx = []
    tt = []
    
    for line in lines:
        aline = line.split()
        xx.append(float(aline[0]))
        tt.append(float(aline[1]))
    
    return xx, tt
    
if __name__ == "__main__":    
    s, t = readFile("front_xxt.dat")
    
    print "Start plot"
    
    ax = subplot(111)
    ax.plot(t, s)
    ax.grid(True)

    ticklines = ax.get_xticklines()
    ticklines.extend( ax.get_yticklines() )
    gridlines = ax.get_xgridlines()
    gridlines.extend( ax.get_ygridlines() )
    ticklabels = ax.get_xticklabels()
    ticklabels.extend( ax.get_yticklabels() )

    for line in ticklines:
        line.set_linewidth(3)

    for line in gridlines:
        line.set_linestyle('-')

    for label in ticklabels:
        label.set_color('r')
        label.set_fontsize('medium')

    show()
